/**
 * Branch.java is created by Zachariah at 2012-1-19 上午10:10:40
 */
package com.zack.designPattern.composite;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zachariah zzcfrog@gmail.com
 * 
 */
public class Branch extends Tree {

	private List<Tree> subTrees;
	
	public Branch() {
		super();
		this.subTrees = new ArrayList<Tree>();
	}

	public Branch(String val) {
		super(val);
		this.subTrees = new ArrayList<Tree>();
	}

	@Override
	public String getValue() {
		return null;
	}
	
	public void add(Tree tree){
		this.subTrees.add(tree);
	}

}
